//
//  NSDictionary+Extend.m
//  Helpers
//
//  Created by bianruifeng on 15/10/18.
//  Copyright © 2015年 bian. All rights reserved.
//

#import "NSDictionary+Extend.h"

@implementation NSDictionary (Extend)

- (NSString *)stringForKey:(id)key
{
    id object = [self objectForKey:key];
    if (object == nil || [object isKindOfClass:[NSNull class]]) {
        return @"";
    } else if ([object isKindOfClass:[NSString class]]) {
        return object;
    } else if ([object isKindOfClass:[NSNumber class]]) {
        return [object stringValue];
    }
    return @"";
}

@end
